from tortoise import Tortoise
async def init():
    await Tortoise.init(
        db_url='mysql://root:ed121212@localhost:3306/lifefriend',
        modules={'models': ['models.user', 'models.course', 'models.corpus']}
    )
    await Tortoise.generate_schemas()


async def shutdown():
    await Tortoise.close_connections()